home *** CD-ROM | disk | FTP | other *** search
- Path: news.cc.ic.ac.uk!simonh
- From: simonh@ic.ac.uk (Dr S.J. Harris)
- Newsgroups: comp.lang.c
- Subject: Re: Mouse Question ???
- Date: 30 Jan 1996 14:02:47 GMT
- Organization: Imperial College of Science, Technology and Medicine, London
- Message-ID: <4el8e7$nk3@oban.cc.ic.ac.uk>
- References: <4ek9ap$1q5g@huey.cadvision.com>
- NNTP-Posting-Host: cvcgf.cv.ic.ac.uk
-
- In article <4ek9ap$1q5g@huey.cadvision.com> Denis Roux <caddsolu@cadvision.com> writes:
- >I would like to know which functions do I have to use to have the mouse in
- >my programs ?
- > Thanks
- >
-
- Well,
-
- you could do the following (can't remember the function names ;^):
-
- 1. enable your X window for input
- 2. set up the events mask for your window to allow mouse
- operations to be reported
- 3. repeatedly check the events queue for mouse operations
- and act upon them (not forgetting to operate on other
- events too, of course)
-
- or,
-
- you could call system interrupt 0x33 via your int86()
- function, which will probably be prototyped in dos.h.
- You will of course have to find out what all the mouse
- sub-function codes are...
-
- or,
-
- you could check the serial data stream of the port that
- your mouse is connected onto (assuming you know the
- transmission protocol for your mouse - different mice
- work differently!)
-
- or, ...
-
- really, there are no *standard* ways of reading mouse input since
- standard C does not know about such things as mice. Besides, mice
- are one of those completely non-standard things that require
- different functions to be used for different types of system (and
- different operating systems on the same system). You would be
- better off asking in a group devoted to your system/operating system.
-
- Regards,
-
- Simon.
-
-